package com.qfjy.homework.guozijian;

import java.util.Date;

/**
 * @author: gzj
 * @date: 2022/11/10  19:18
 * @version: 1.0
 *
 *              中介者模式
 **/
public class User {

    private String name;

    public void sendMessage(String message){
        ChatRoom.showMessage(this,message);
    }

    @Override
    public String toString() {
        return "User{" +
                "name='" + name + '\'' +
                '}';
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public User(String name) {
        this.name = name;
    }
}
